package cn.yerly.sakura.dao.model;

import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.ManyToOne;

/**
 * 产品分类属性
 * 
 * @author yerly
 *
 */
@Entity
public class CategoryAttribute {
	@Id
	private Long id;
	@ManyToOne
	private Category category;
	@ManyToOne
	private Attribute attribute;
	private Boolean required;
	private Boolean disabled;

	public Long getId() {
		return id;
	}

	public void setId(Long id) {
		this.id = id;
	}

	public Category getCategory() {
		return category;
	}

	public void setCategory(Category category) {
		this.category = category;
	}

	public Attribute getAttribute() {
		return attribute;
	}

	public void setAttribute(Attribute attribute) {
		this.attribute = attribute;
	}

	public Boolean getRequired() {
		return required;
	}

	public void setRequired(Boolean required) {
		this.required = required;
	}

	public Boolean getDisabled() {
		return disabled;
	}

	public void setDisabled(Boolean disabled) {
		this.disabled = disabled;
	}

	@Override
	public String toString() {
		return "CategoryAttribute [id=" + id + ", category=" + category
				+ ", attribute=" + attribute + ", required=" + required
				+ ", disabled=" + disabled + "]";
	}

}
